#ifndef __MY_IIC_H
#define __MY_IIC_H

#include "stm32F4xx.h"


#define RCU_SCL     RCC_AHB1Periph_GPIOA
#define PORT_SCL    GPIOA
#define GPIO_SCL    GPIO_Pin_1

#define RCU_SDA     RCC_AHB1Periph_GPIOA
#define PORT_SDA    GPIOA
#define GPIO_SDA    GPIO_Pin_2 


void My_iic_Init(void);
void Write_SDA(uint8_t BitValue);
void Write_SCL(uint8_t BitValue);
uint8_t Read_SDA(void);
void IIC_Start();
void IIC_Stop();
void MyIIC_SendAck(uint8_t AckBit);
uint8_t MyIIC_ReceiveAck(void);
void MyIIC_SendByte(uint8_t Byte);
uint8_t MyIIC_ReceiveByte(void);

#endif

